from langchain.chat_models import init_chat_model
from langchain_core.prompts import PromptTemplate

llm = init_chat_model(
    model_provider="openai",
    model="qwen/qwq-32b:free",
    base_url="https://openrouter.ai/api/v1",
    api_key="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",
)

tmp = PromptTemplate.from_template("这是用户的输入：{input}")
tips = tmp.format(
    input="你好，请给我讲个关于冰淇淋的笑话",
)

print("tips", tips)
